package com.zy.cat.entity.game.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import com.zy.cat.entity.game.CVSDrawCountHistory;
import com.zy.cat.entity.game.TrunDrawCountHistory;
import com.zy.cat.entity.game.TrunDrawHistory;

public interface TrunDrawCountHistoryRepository  extends JpaSpecificationExecutor<TrunDrawCountHistory>,  JpaRepository<TrunDrawCountHistory, String>{
	
	/**
	 * 查询用户抽奖次数
	 * @param pid 用户ID
	 * @param ctime 时间
	 * @param dtype 类型（-1.消耗、1.奖励）
	 * @return
	 */
	public TrunDrawCountHistory findByPidAndCtimeAndDtype(String pid,String ctime,int dtype);
}
